<!--设置模块唯一ID-->
<div id="aq_ds_tuihuodan">
    <!--标题、面包屑-->
    <section class="content-header">
        <h1>
            退货单
            <small>电商</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li>奥桥</li>
            <li>电商</li>
            <li class="active">退货单</li>
        </ol>
    </section>
    <!--列表-->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <div class="btn-group pull-left" data-type="actionBar">
                            <button type="button" class="btn btn-default" data-action="download"><i class="fa fa-download"></i> 下载</button>
                        </div>
                        <div class=" pull-right" data-type="columnControl">
                        </div>
                        <div class=" pull-right " data-type="searchControl">
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="box-body">
                        <table class="table table-bordered table-striped table-hover" style="width: 2000px"></table>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <script>
        USEN(function () {
            //模块ID(全系统唯一)
            var id = "#aq_ds_tuihuodan";

            //定义页面变量
            var $el = $(id);
            var $actionBar = $el.find("[data-type=actionBar]");
            var tableId = id + " table.table";
            var $table = $(tableId);
            var myTable;


            //定义增\删\改 方法
            var editor = {
                download: function (data) {
                    //
                }
            };

            // 绑定列表编辑按钮事件
            $actionBar.find("[data-action]").on("click", function () {
                var action = $(this).data("action");
                var $selected = $table.find('tr.selected');
                switch (action) {
                    case "download" :
                        editor.download();
                        break;
                }
            });

            //初始化datatable数据列表
            myTable = new USEN.Datatable({
                //设置ID
                "id": tableId,
                //设置列控制模块容器
                "columnControl": id + " [data-type=columnControl]",
                //设置搜索模块容器
                "searchControl": id + " [data-type=searchControl]",
                //配置服务
                "ajax": "./simdata/common_table_ation.json",
                //列设置
                "columns": [
                    { "title": "编号", "data": "p2"},
                    { "title": "售后状态", "data": "p3"},
                    { "title": "售后类型", "data": "p4" },
                    { "title": "是否完成", "data": "p5" },
                    { "title": "店铺类型", "data": "p6" },
                    { "title": "订单编号", "data": "p7" },
                    { "title": "退货原因", "data": "p7" },
                    { "title": "备注", "data": "p7" }
                ]
            })
        });
    </script>
</div>